<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr = [1,2,3] //arr拥有的是[1,2,3]的地址
        var arr1 = arr;//arr1的地址是[1,2,3]
        // arr = []//把[]地址给arr 
        // console.log(arr1 === arr)
        // arr.length = 0//第一种 不改变地址的思路
        // console.log(arr === arr1)

        arr.splice(0,arr.length)
        console.log(arr === arr1)
        console.log(arr)
    </script>
</body>
</html>